package cn.springcloud.fix.consumer.controller;

import cn.springcloud.fix.common.cache.service.RedisService;
import cn.springcloud.fix.common.core.base.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class PubMessageController {

    @Autowired
    private RedisService redisService;

    @GetMapping("/a")
    public R<Object> a() {
        redisService.convertAndSend("a", "ae67");
        return R.SUCCESS();
    }

    @GetMapping("/b")
    public R<Object> b() {
        redisService.convertAndSend("b", "b");
        return R.SUCCESS();
    }
}
